class foo {
    constructor(a) {
        this[a] = a
    }
}
console.log(new foo("a"))
